<!-- 二维码 -->
<template>
	<view class="code-dom" style="">
		<view class="code-ewm">
			<uqrcode ref="uqrcode" canvas-id="qrcode" :value="'https://zjs.jingkunkj.com?userId=' + userData.userId + '&id=' + userData.id"
				:options="{
			        foregroundImageSrc: '/static/images/logo1.png',
			        foregroundImageWidth: 40,
			        foregroundImageHeight: 40,
			        drawReserve: true
			      }">
				<template v-slot:loading>
					<text style="color: green;">loading...</text>
				</template>
			</uqrcode>
		</view>
		<view class="code-text">使用微信扫描二维码预览信息</view>
		
	</view>
</template>

<script lang="ts" setup>
	import { getUser } from "@/utils/storage"

	let userData = getUser()
</script>

<style lang="scss" scoped>
	.code-dom{
		padding: 10px;
		background: #fff;
		text-align: center;
		.code-text{
			padding: 10px 0;
			font-size: 28rpx;
			color: #999;
		}
	}
	.code-ewm {
		display: flex;
		flex-direction: row;
		justify-content: center;
		padding: 10px;
	}
</style>